package com.zzcoder.mall.data.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;

@ApiModel(value = "商品")
@Data
@Table
@Entity
public class PmsProduct extends BaseEntity {
    @ApiModelProperty(value = "商品名称")
    @Column
    private String name;

    @ApiModelProperty(value = "商品概要")
    @Column(columnDefinition = "text")
    private String summary;

    @ApiModelProperty(value = "商品详细信息")
    @Column(columnDefinition = "text")
    private String detail;

    @ApiModelProperty(value = "商品图片")
    @Column
    private String imgUrl;

    @ApiModelProperty(value = "商品库存")
    @Column
    private Long stock;

    @ApiModelProperty(value = "商品价格")
    @Column
    private Double price;

    @ApiModelProperty(value = "销售状态")
    @Column
    @Enumerated(EnumType.STRING)
    private PmsSellingStatus sellingStatus = PmsSellingStatus.PUT_ON_SHELVES;

    @ApiModelProperty(value = "分类ID")
    @Column
    private Long categoryId;
}
